package org.chen.controller;

import lombok.extern.slf4j.Slf4j;
import org.chen.model.vo.DashboardStatisticsVO;
import org.chen.response.Result;
import org.chen.service.impl.DashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
@Slf4j
public class DashBoardController {
    @Autowired
    private DashboardService dashboardService;

    @GetMapping("/statistics")
    public Result<DashboardStatisticsVO> getStatistics() {
        return Result.success(dashboardService.getStatistics());
    }
}
